package com.api.v1.service;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * 处理监听队列是否来了新消息
 */

@Service
@RabbitListener(queues = "miaoshaQueue")
public class OrdersServiceListener {

    @RabbitHandler
    public void recvMiaosha(String msg)
    {
        System.out.println("收到消息:"+msg);
    }

}
